package org.dromara.common.sms.lxk.config;

import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.dromara.common.sms.lxk.LxkSmsImpl;
import org.dromara.sms4j.provider.factory.AbstractProviderFactory;

/**
 * @author heyi
 * 2024/8/13
 */
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class LxkFactory extends AbstractProviderFactory<LxkSmsImpl, LxkSmsConfig> {

    private static final LxkFactory INSTANCE = new LxkFactory();

    /**
     * 获取建造者实例
     *
     * @return 建造者实例
     */
    public static LxkFactory instance() {
        return INSTANCE;
    }

    /**
     * 创建短信实现对象
     *
     * @param lxkSmsConfig 短信配置对象
     * @return 短信实现对象
     */
    @Override
    public LxkSmsImpl createSms(LxkSmsConfig lxkSmsConfig) {
        return new LxkSmsImpl(lxkSmsConfig);
    }

    /**
     * 获取供应商
     *
     * @return 供应商
     */
    @Override
    public String getSupplier() {
        return "lxk";
    }

}
